<template>
  <div class="home">
    <!-- 头部 -->
    <Header :show="!this.$store.getters.isinput" />
    <!-- 副头部 -->
    <Header2 v-if="this.$store.getters.isinput" />
    <transition mode="out-in">
      <router-view></router-view>
    </transition>
    <!-- 尾部 -->
    <Footer />
  </div>
</template>

<script>
import Header from "@/components/Header.vue";
import Header2 from "@/components/Header2";
import Footer from "@/components/footer";
export default {
  name: "Home",
  data() {
    return {
      input1: "",
      show: true,
      isa: true
    };
  },
  components: {
    Header,
    Footer,
    Header2
  },
  created() {
    this.isinput();
  },
  methods: {
    inputclick(a) {
      console.log(a);
    },
    isinput() {
      this.$store.commit("setDValue", true);
    },
  }
};
</script>
<style scoped lang="scss">
.home {
  background-color: #f9f9f9;
}
.v-enter {
  opacity: 0;
}
.v-enter-active {
  transition: 0.2s;
}
.v-enter-to {
  opacity: 1;
}
.v-leave {
  opacity: 1;
}
.v-leave-to {
  opacity: 0;
}
.v-leave-active {
  transition: 0.2s;
}
</style>
